package com.sixmac.core.base.model;

/**
 * 参数验证注解配置类
 * 
 * @author tangxh
 * @date 2015-12-04 11:14
 */

public abstract class Format {

	/**
	 * 非空限制
	 */
	public static final String NOT_NULL = "not_null";

	/**
	 * 忽略
	 */
	public static final String IGNORE = "ignore";

	/**
	 * 纯数字限制
	 */
	public static final String REG_NUMBER = "^[-+]?(([0-9]+)([.]([0-9]+))?|([.]([0-9]+))?)$";
	
	/**
	 * 中文限制
	 */
	public static final String REG_CN = "[\\u4e00-\\u9fa5]+";
	
	/**
	 * 手机号码正则验证
	 */
	public static final String REG_PHONE = "^[1][34578][0-9]{9}$";
	
	/**
	 * 邮箱正则验证
	 */
	public static final String REG_EMAIL = "^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$";
	

	/**
	 * 身份证正则验证
	 */
	public static final String REG_IDCARD = "^(^\\d{15}$)|(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)$";
	
	/**
	 * 字符串长度验证，传值格式 :len_min_max  
	 * 例如
	 * len_10_max 验证字符串长度大于等于10
	 * len_min_20   验证字符串长度小于等于20
	 * len_20               验证字符串长度等于20
	 * 
	 */
	public static final String LEN_FORMAT = "len_6_18";	
}
